<template>
  <div>
      <TypeNav/>
      <list-container></list-container>
      <recommend></recommend>
      <rank></rank>
      <like></like>
      <div v-for="(item,index) in floorList" :key="index">
        <floor :list="item"></floor>
      </div>
      <brand></brand>
  </div>
</template>

<script>
import ListContainer from '@/pages/Home/ListContainer'
import recommend from '@/pages/Home/Recommend'
import rank from '@/pages/Home/Rank'
import like from '@/pages/Home/Like'
import floor from '@/pages/Home/Floor'
import brand from '@/pages/Home/Brand'
import {mapState} from 'vuex'
export default {
  components:{
    ListContainer,
    recommend,
    rank,
    like,
    floor,
    brand,
  },
  mounted() {
    // 派发action ，获取floor数据
    this.$store.dispatch('getFloorList')
  },
  computed:{
    ...mapState({
      floorList:(store)=>{
        return store.home.floorList
      }
    })
  },
  methods:{
   
  }
}
</script>

<style scoped>

</style>